layui.config({
	base : "js/"
}).use(['form','layer','jquery','layedit','laydate'],function(){


    var id=GetQueryString("id")


ajaxget("/index/award/admin/find",{id:id},function (data) {
	var info =data.data
    var flag=null;
	if(info.flag==0){
	    flag="否"
    }else {
	    flag="是"
    }

    document.getElementById("id").value=info.id
    document.getElementById("name").value=info.name
    document.getElementById("price").value=info.price
    document.getElementById("type").value=info.type
    document.getElementById("phase").value=info.phase
    document.getElementById("rule").value=info.rule;


})


	
})


function GetQueryString(name)
{
    var reg = new RegExp("(^|&)"+ name +"=([^&]*)(&|$)");
    var r = window.location.search.substr(1).match(reg);
    if(r!=null)return  unescape(r[2]); return null;
}
function formatDateTime(inputTime) {
    var date = new Date(inputTime);
    var y = date.getFullYear();
    var m = date.getMonth() + 1;
    m = m < 10 ? ('0' + m) : m;
    var d = date.getDate();
    d = d < 10 ? ('0' + d) : d;
    var h = date.getHours();
    h = h < 10 ? ('0' + h) : h;
    var minute = date.getMinutes();
    var second = date.getSeconds();
    minute = minute < 10 ? ('0' + minute) : minute;
    second = second < 10 ? ('0' + second) : second;
    return y + '-' + m + '-' + d+' '+h+':'+minute+':'+second;
};